package shake.context;

import com.google.inject.Inject;

public class ThreadLocalObject<T> implements ScopedObject<T> {
	@Inject
	ThreadLocal<T> threadLocal;

	public T get() {
		return threadLocal.get();
	}

	public T remove() {
		T t = get();
		threadLocal.remove();
		return t;
	}

	public void set(T o) {
		threadLocal.set(o);
	}

}
